<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
      //     const prop = 'friend'
      // const obj = {
      //   prop: 'jack'
      // }
      // obj.name='jack'
      // obj[prop] = 'jack'


      // console.log(obj)


      const prop = 'name'
      const obj = {
        [prop + 'Key']: 'rose'
      }
      console.log(obj)
  </script>
</body>
</html>